package com.ctc.ctcoss.ws.service;

public class ISmsServiceProxy implements com.ctc.ctcoss.ws.service.ISmsService {
    private String _endpoint = null;
    private com.ctc.ctcoss.ws.service.ISmsService iSmsService = null;

    public ISmsServiceProxy() {
        _initISmsServiceProxy();
    }

    public ISmsServiceProxy(String endpoint) {
        _endpoint = endpoint;
        _initISmsServiceProxy();
    }

    private void _initISmsServiceProxy() {
        try {
            iSmsService = (new com.ctc.ctcoss.ws.service.impl.SmsServiceImplServiceLocator()).getSmsServiceImplPort();
            if (iSmsService != null) {
                if (_endpoint != null)
                    ((javax.xml.rpc.Stub) iSmsService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
                else
                    _endpoint = (String) ((javax.xml.rpc.Stub) iSmsService)._getProperty("javax.xml.rpc.service.endpoint.address");
            }

        } catch (javax.xml.rpc.ServiceException serviceException) {
        }
    }

    public String getEndpoint() {
        return _endpoint;
    }

    public void setEndpoint(String endpoint) {
        _endpoint = endpoint;
        if (iSmsService != null)
            ((javax.xml.rpc.Stub) iSmsService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);

    }

    public com.ctc.ctcoss.ws.service.ISmsService getISmsService() {
        if (iSmsService == null)
            _initISmsServiceProxy();
        return iSmsService;
    }

    public java.lang.String[] getReport(java.lang.String arg0, java.lang.String arg1, com.ctc.ctcoss.ws.service.MtNewMessage[] arg2) throws java.rmi.RemoteException {
        if (iSmsService == null)
            _initISmsServiceProxy();
        return iSmsService.getReport(arg0, arg1, arg2);
    }

    public java.lang.String[] getSms(java.lang.String arg0, java.lang.String arg1) throws java.rmi.RemoteException {
        if (iSmsService == null)
            _initISmsServiceProxy();
        return iSmsService.getSms(arg0, arg1);
    }

    public java.lang.String[] sendSms(java.lang.String arg0, java.lang.String arg1, com.ctc.ctcoss.ws.service.MtNewMessage arg2) throws java.rmi.RemoteException {
        if (iSmsService == null)
            _initISmsServiceProxy();
        return iSmsService.sendSms(arg0, arg1, arg2);
    }

    public java.lang.String[] batchSendSms(java.lang.String arg0, java.lang.String arg1, com.ctc.ctcoss.ws.service.MtNewMessage[] arg2) throws java.rmi.RemoteException {
        if (iSmsService == null)
            _initISmsServiceProxy();
        return iSmsService.batchSendSms(arg0, arg1, arg2);
    }

    public java.lang.String[] getBalance(java.lang.String arg0, java.lang.String arg1) throws java.rmi.RemoteException {
        if (iSmsService == null)
            _initISmsServiceProxy();
        return iSmsService.getBalance(arg0, arg1);
    }


}